home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / e_os208 / example4 / example4.asm next >
Assembly Source File  |  1996-06-09  |  2KB  |  55 lines

  1. ;╔══════════════════════════════════════════════════════════════════════════╗
  2. ;║                                                                          ║
  3. ;║ Load a SCX compress pic, use 320x200 256 colors to display               ║
  4. ;║                                                                          ║
  5. ;║ and show the Load_Internal_File function                                 ║
  6. ;║                                                                          ║
  7. ;║ Tabs : 13 21 29 37                                                       ║
  8. ;║                                                                          ║
  9. ;╚══════════════════════════════════════════════════════════════════════════╝
  10.  
  11. Locals
  12. .386
  13. CODE32 SEGMENT PUBLIC PARA 'CODE' USE32
  14. ASSUME  CS:CODE32,DS:CODE32,ES:CODE32
  15.  
  16. INCLUDE ..\RESOURCE\EOS.INC
  17.  
  18. File_Pic1   db '..\data\test320.DLZ',0
  19. Addr_Pic    dd 0
  20.  
  21. Start32:
  22.             mov ah,Load_Internal_File
  23.             mov edx,O File_Pic1
  24.             Int_EOS                 ; Load the file even if the program isn't
  25.             mov [Addr_Pic],eax      ; Link + Internal Check if the File is present
  26.  
  27.             mov ax,13h              ; Set VGA 320*200 256c
  28.             DosInt 10h
  29.  
  30.             mov esi,[Addr_Pic]      ; Set palette
  31.             add esi,10              ; Header Offset of SCX
  32.             mov dx,3c8h
  33.             xor al,al
  34.             out dx,al
  35.             mov ecx,256*3
  36.             inc dl
  37.             cli
  38. @@again:    outsb                   ; rep outsb do not work with all cards
  39.             loop @@again
  40.             sti
  41.  
  42.             mov edi,[_0a0000h]      ; Display picture
  43.             mov ecx,320*(200/4)
  44.             rep movsd
  45.  
  46.             xor ah,ah               ; Wait a key
  47.             DosInt 16h
  48.  
  49.             mov ax,4c00h
  50.             int 21h                 ; Exit with Error Code 0
  51.                                     ; and Automaticly restore video Mode !!!
  52.  
  53.             CODE32 ENDS
  54.  
  55.             END